/*
 * cmd_efuse_simple_test.c
 *
 *  Created on: Nov 10, 2016
 *      Author: duobao
 */


/*
 * cmd_efuse_test.c
 *
 *  Created on: Sep 28, 2016
 *      Author: duobao
 */

#include "../drivers/crypto/mol_hw_sha.h"
#include <common.h>
#include <command.h>





int hw_rsa_modexp_cal(cmd_tbl_t *cmdtp,int flag,int argc,char *argv[])
{
	char *endp;
	int ret;
    unsigned long N = 0;
    unsigned long Nlen = NULL;
    unsigned long E = 0;
    unsigned long Elen = NULL;
    unsigned long in = 0;
    unsigned long dst = 0;



    
    if (argc != 7)
        return CMD_RET_USAGE;

	E = simple_strtoul(argv[1], NULL, 16);
	Elen = simple_strtoul(argv[2], &endp, 16);
	N = simple_strtoul(argv[3], &endp, 16);
	Nlen = simple_strtoul(argv[4], &endp, 16);
	in = simple_strtoul(argv[5], &endp, 16);
	dst = simple_strtoul(argv[6], &endp, 16);

	unsigned long long t1,t2,t3;
	
    hw_rsa_modexp(E,Elen,N,Nlen,in,dst);


	return 0;
}

U_BOOT_CMD(

		hw_rsa_modexp_cal,7,1,hw_rsa_modexp_cal,"hw_rsa_modexp_cal by hw","usage:hw_rsa_modexp_cal E Elen N nlen in dst \n"

);



